// @ts-ignore
import { request } from "./request";
export interface EnterLibraryListRes {
    id: string;
    coordinate:{lat:number;lng:number}[]
}
export interface RawTplListRes {
    templateId: string; 
    templateName: string 
}
const myApi = {
    getRawInboundDetail: (params: { id: string }) => {
        return request<{ data: EnterLibraryListRes }>({
            params,
            url: '/ypInventory/findEnterLibraryInfo',
            method: 'get',
        })
    },
    getRawTpl: (params: { medicineType: string;source: string ;varietyName: string  }) => {
        return request<{ data: RawTplListRes[] }>({
            params,
            url: '/ypRetrospectSourceTemplate/findSourceTemplateByCondition',
            method: 'get',
        })
    },
    addRawInfo: (data: any) => {
        return request({
            data,
            url: '/ypInventory/addNotRetrospectSource',
            method: 'post',
        })
    },
    // ------------------------ 图片上传 ----------------
    uploadImage: (data: any) => {
        return request({
            data,
            url: '/file/uploadImage',
            method: 'post',
        })
    },

}
export default myApi
